﻿using System.Windows;
using System.Windows.Controls;

namespace UniversalEditor.Base.MenuBarItems
{
	public class MenuStyleSelector : StyleSelector
	{
		public Style NoneStyle { get; set; }
		public Style ListStyle { get; set; }
		public Style SeparatoeStyle { get; set; }
		public Style CommandStyle { get; set; }
		public Style CheckStyle { get; set; }

		public override Style SelectStyle(object item, DependencyObject container)
		{
			if (item is MenuNoneItem)
				return NoneStyle;
			if (item is MenuListItem)
				return ListStyle;
			if (item is MenuSeparator)
				return SeparatoeStyle;
			if (item is MenuCommandItem)
				return CommandStyle;
			if (item is MenuCheckCommand)
				return CheckStyle;

			return null;
		}
	}
}
